package com.icss.service.citycode;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.icss.service.BaseService;

/**
 * 城市代码管理
 * @author shixiaolong
 * @dateJun 18, 2012
 */
public class CityCodeService extends BaseService{
	
	public List<Map> getList(HttpServletRequest request){
		String page_num = req.getValue(request, "page_num");
		String city_code = req.getValue(request, "city_code");
		System.out.println("--city_code--"+city_code);
		String city_name = req.getValue(request, "city_name");
		System.out.println("------city_name--------"+city_name);
		String sql="select * from tbl_city_code where 1=1 ";
		if(!"".equals(city_code)){
			sql+=" and city_code like '%"+city_code+"%'";
		}
		if(!"".equals(city_name)){
			sql+=" and city_name like '%"+city_name+"%'";
		}
		return db.getForList(sql, Integer.parseInt(page_num), request);
	}

}
